import { defaultTheme } from '@vuepress/theme-default'
import { defineUserConfig } from 'vuepress'
import { viteBundler } from '@vuepress/bundler-vite'

export default defineUserConfig({
  lang: 'zh-CN',
  base: "/vuePressCreate/",
  title: '钟楼论坛',
  description: '这是一个个人自制角色和剧本的网站',

  theme: defaultTheme({
    logo: '/image/logo.png',
    
    // 导航栏配置
    navbar: [
      { text: '首页', link: '/' },
      { text: '指南', link: '/guide/' },
      { text: '角色', link: '/characters/' },
      { text: '剧本', link: '/scripts/' }
    ],

    // 侧边栏配置 - 简化版本
    sidebar: {
      '/': [
        {
          text: '首页',
          children: [
            '/get-started',
          ]
        }
      ],
      '/guide/': [
        {
          text: '指南',
          children: [
            '/guide/',  // 这会自动对应到 README.md
            '/guide/getting-started',
          ]
        }
      ],
      '/characters/': [
        {
          text: '角色',
          children: [
            '/characters/zhenmin',
            '/characters/wailaizhe',
            '/characters/zhaoya',
            '/characters/emo',
            '/characters/lvxingzhe',
          ]
        }
      ],
      '/scripts/': [
        {
          text: '剧本',
          children: [
            '/scripts/',  // 这会自动对应到 README.md
            '/scripts/script-1',
          ]
        }
      ]
    }
  }),

  bundler: viteBundler(),
})